package com.example.goodsass.controller;

import com.example.goodsass.domain.Goodsass;
import com.example.goodsass.service.GoodsassService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController()
@RequestMapping("/TGoods")
@Tag(name = "goods online info",description = "商品在库信息")
public class GoodsAssControll {
    @Autowired
    private GoodsassService goodsassService;

    @Operation(description = "AssSelByNo")
    @GetMapping("AssSelNo")
    public List<Goodsass> AssSelByNo() {
        return goodsassService.AssSelByNo();
    }

    @Operation(description = "AssIns")
    @GetMapping("AssIns")
    public String AssIns(int Goods_No, int Goods_Num, String GoodsAss_Flg) {
        return goodsassService.AssIns(Goods_No,Goods_Num,GoodsAss_Flg);
    }
    @Operation(description = "AssDelByNo")
    @GetMapping("AssDelByNo")
    public String AssDelByNo(int Goods_No) {
        return goodsassService.AssDelByNo(Goods_No);
    }
    @Operation(description = "AssUpdByNo")
    @PostMapping("AssUpdByNo")
    public String AssUpdByNo(@RequestBody Goodsass goodsass) {
        return goodsassService.AssUpdByNo(goodsass);
    }
}
